package com.lezo.idober.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;

import com.lezo.idober.error.CustomExceptionHandlerExceptionResolver;
import com.lezo.idober.error.NotFoundException;

@ControllerAdvice
public class ErrorHandleController {

	@ExceptionHandler(NotFoundException.class)
	@ResponseStatus(HttpStatus.NOT_FOUND)
	public String handleNotFoundException(HttpServletRequest request) {
		return CustomExceptionHandlerExceptionResolver.VIEW_404;
	}
}